home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / mtask.exe / MTASK.H < prev   
C/C++ Source or Header  |  1993-05-09  |  1KB  |  41 lines

  1. /* MTASK V1.0  
  2.  
  3.   A minimal multitasking library for DOS.  Copyright 1993 I H Ting.
  4.  
  5.   Disclaimer:
  6.   Use the code at your own peril. I don't promise it actually does anything.
  7.   Even if the world ends when you use it, don't hold me responsible. 
  8.  
  9.   Comments and suggestions, however, are welcomed. I can be reached at:
  10.  
  11.   Compuserve ID: 100023,3363
  12.   Internet: cm1826@ccub.wlv.ac.uk
  13.  
  14. */
  15.  
  16. #ifndef MTASK_H
  17. #define MTASK_H
  18.  
  19. /* Change these to suit your application */
  20. #define MAX_TASKS  40
  21. #define TASK_STACK_SIZE 4096
  22.  
  23.  
  24. typedef int (far *PTaskFunc) (void);
  25.  
  26. /* These are the functions you can call */
  27. void InitMultiTasking(void);
  28. int AddNewTask(PTaskFunc pTaskFunc);
  29. void interrupt StartMultiTasking(void);
  30. void RemoveTask(unsigned taskID);
  31. void EndMultiTasking(void);
  32. void MTWait(unsigned *semaphore);
  33. void MTSignal(unsigned *semaphore);
  34. void MTPuts(char *s);
  35. void MTXYPuts(int x,int y,char *s);
  36. char MTGetch(void);
  37. void MTPutch(char c);
  38. void MTXYPutch(int x, int y, char c);
  39.  
  40. #endif
  41.